package org.hq.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.hq.pojo.VideoMessage;
import org.hq.pojo.select.VideoSelect;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class VideoSelectMapperTest {
@Autowired
    VideoSelectMapper videoSelectMapper;
    @Test
    void pageVideoMessage() {
        //videoSelectMapper.pageVideoMessage(1,1);
        Page<VideoSelect> page = new Page<>(1, 20);
        // 创建查询条件对象
        // 添加查询条件
        Page<VideoSelect> pa= videoSelectMapper.pageVideoMessage(page);
        for (VideoSelect vm:pa.getRecords())
        {
            System.out.println(vm.getMenuName());
            System.out.println(vm.getName());
        }
        System.out.println(pa.getSize());
    }
}